<html>
<head>
<meta charset="UTF-8">
<title>添加部门</title>
</head>
<body>
	<link rel="stylesheet" type="text/css" href="/css/form.css">
	<link rel="stylesheet" type="text/css" href="/css/public.css">
	<link rel="stylesheet" type="text/css" href="/css/task.css">
	<script type="text/javascript" src="/js/task.js"></script>
	<script type="text/javascript">
		$(".navigation span:first").text("任务管理");
		$('input[name=type][value=${(task.type)!"1"}]').attr("checked",true);
	</script>
	<style>
		.form-content fieldset>table>tbody>tr> td:NTH-CHILD(odd){
		      font-size: 12px;
		}
	</style>
	<#include "/head.ftl"/>
	<div class="contacts-tables" style="display: none;">
		<div class="contacts-tables-div">
			<div style="height: 44px; border-bottom: 1px solid #f2f2f2;">
				<div class="tab-tool"
					style="margin-right: 10px; line-height: 28px; margin-top: 7px;">
					<input name="search" class="search-btn-shareuser-input" type="text"
						placeholder="查找..."> <a
						class="search-btn search-btn-shareuser"> <i
						class="iconfont icon-search" style="font-size: 16px;"></i>
					</a>
				</div>
			</div>
			<div class="tab-content">
				<div>
				<table style="width: 100%; border-collapse: collapse; background: #fff;">
					<thead>
						<th>选择</th>
						<th>头像</th>
						<th>部门</th>
						<th>姓名</th>
						<th>职位</th>
						<th>电话</th>
					</thead>
					<tbody>
					<#list userlist as user>
						<tr style="border-bottom: 1px solid #f2f2f2">
							<td><div  data="${user.id}" name="${user.realName}" onclick='select(this)' class="icheckbox icheckbox_flat-green"
									aria-checked=false style="position: relative;">
									<input type="checkbox"
										style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;">
									<ins class="iCheck-helper"
										style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
								</div></td>
							<td><img src='/file/image/${user.photo}'
								style="border-radius: 50%; width: 25px; height: 25px; vertical-align: middle;" /></td>
							<td>${user.dept.name}</td>
							<td>${user.realName}</td>
							<td>${user.deptOffice.name}</td>
							<td>${user.tel}</td>
						</tr>
						</#list>
					</tbody>
				</table>
				
				</div>
			</div>
		</div>
	</div>
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a title="返回" class="btn btn-setting return-task"">
					<i class="iconfont icon-undo"></i>
				</a> <a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a> 
			</div>
			<div class="form-content">
				<form id="taskForm" method="post" enctype="multipart/form-data">
					<fieldset>
					<legend>任务信息</legend>
						<table>
							<tr>
								<td>任务名称:</td>
								<td colspan="4"><input type="text" name="tmTitle" maxlength="10" value="${(task.tmTitle)!''}"></td>
							</tr>
							<tr>
								<td>任务内容:</td>
								<td colspan="4">
									<textarea name="tmContent" style="width: 100%;line-height: 20px;min-height: 78px;font-size: 14px">${(task.tmContent)!''}</textarea>
								</td>
							</tr>
							<tr>
								<td>任务类型:</td>
								<td colspan="4" style="font-size: 12px;">
									<#list status['task_manage_type'] as tasktype>
										<input  class=""  type="radio" name="type" value="${tasktype.value}" style="margin: 0 10px">${tasktype.name}
									</#list>
								</td>
							</tr>
							<tr>
								<td>开始日期:</td>
								<td>
									<#if task??>
									<input value="${(task.tmStartTime?string('yyyy-mm-dd')!'')}" id="start" name="tmStartTime" class="start-time" type="text" style="color:#565454"  onfocus="WdatePicker({onpicked:function(){  },maxDate:'#F{$dp.$D(\'end\')}'})" />
									<#else>
									<input  id="start" name="tmStartTime" class="start-time" type="text" style="color:#565454"  onfocus="WdatePicker({onpicked:function(){  },maxDate:'#F{$dp.$D(\'end\')}'})" />
									</#if>
								</td>
								<td>结束日期:</td>
								<td>
								<#if task??>
									<input value="${(task.tmEndTime?string('yyyy-mm-dd')!'')}" id="end" name="tmEndTime" class="end-time" type="text"  style="color:#565454" onfocus="WdatePicker({onpicked:function(){  },minDate:'#F{$dp.$D(\'start\')}'})" />
									<#else>
									<input  id="end" name="tmEndTime" class="end-time" type="text" style="color:#565454"  onfocus="WdatePicker({onpicked:function(){  },minDate:'#F{$dp.$D(\'start\')}'})" />
									</#if>
								</td>
							</tr>
							
							<tr>
								<td>参与人员:</td>
								<td colspan="4">
								<div class="form-group" style="position: relative;">
													<input value="${(username)!''}" type="text" class="form-control getmain-user" readonly="readonly" style="padding: 0px;"> 
													<div style="position: absolute; top: 5px; right: 5px;">
																<a href="javascript:void(0)" class="fancybox "> <span
															class="label label-success uniquebackground" style="border-radius: 3px;padding: 2px 3px;"> <i
														class="iconfont icon-jia " style="color: white;font-size: 11px;"></i>添加
													</span>
													</a>
												<input type="hidden" class="userid-input" name="shareuser" value=""/>
										</div>
								</td>
							</tr>
							<tr>
								<td>完成标准:</td>
								<td colspan="4">
									<textarea name="finishrequre" style="width: 100%;line-height: 20px;min-height: 78px;font-size: 14px">${(task.finishrequre)!''}</textarea>
								</td>
							</tr>
							<tr>
								<td>任务附件:</td>
								<td>
								<#if task??&task.attid??>
									<a class="uploadattch" style="font-size: 12px; color: #94754D;"><i class="iconfont icon-accessory"></i>附件更改</a>
								<#else>
									<a class="uploadattch" style="font-size: 12px; color: #94754D;"><i class="iconfont icon-accessory"></i>附件上传</a>
									<span class="filename" style="margin-left: 10px;font-size: 12px;"></span>
								</#if>
									<input class="file" type="file" name="file" style="display:none"/>
								</td>
							</tr>
							<tr>
								<td style="text-align: center;" colspan="4">
									<input type="hidden" name="tmId" value="${(task.tmId)!''}"/>
									<input type="hidden" name="attid" value="${(task.attid)!''}"/>
									<input class="button"style="padding: 11px 40px;" type="submit" value="保存">
								</td>
							</tr>
						</table>
					</fieldset>
				</form>
			</div>
		</div>
	</div>
</body>
</html>